package com.example.myapplication;

import android.content.Intent;
import android.util.Log;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;

public class jumping7Activity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_jumping7);
        Log.d("jumping7Activity","创建");
        findViewById(R.id.jumping8).setOnClickListener(this);
        findViewById(R.id.jumping9).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.jumping8:
                //单例模式
                startActivity(new Intent(this, MainActivity.class).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP));

            case R.id.jumping9:
                startActivity(new Intent(this, jumping10Activity.class).addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP));
        }
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
        Log.d("Activity","销毁活动");
    }
}
